/**************************************************************************/
/*                                                                        */
/* Copyright (c) Sinoembed Technology Co.,Ltd.           */
/*  */
/*                                                                        */
/*                                                                        */
/*    created:    2012-6-27                                             */ 
/*    filename:   CSinoembedPuzzleWnd.h                                          */ 
/*    author:     Derek Huang                                                  */  
/*    purpose:                                                            */ 
/*                                                                        */
/* ************************************************************************/

#ifndef __CE_SWC_WND_H__
#define __CE_SWC_WND_H__
#include <mzfc_inc.h>
//#include "iUiButton.h"
#include "UiSWCTopBar.h"
#include "UiSWCSwitchWnd.h"
#include "UiSteeringWnd.h"
#include "UiCarWnd.h"
#include "UiAutoLogoWnd.h"
#include "TBInvokeInterface.h"

typedef enum _tagSWCWndDisplay
{
	SWC_TOPBAR_WND = 0,
	SWC_STEERING_WND,
	SWC_CAR_WND,
	SWC_AUTO_LOGO_WND,
	SWC_SWITCH_WND,
	MAX_SWC_WND,
} SWC_WND;

class CSWCWnd : public CMzWndEx
{
public:
	CSWCWnd();
	virtual ~CSWCWnd();
	virtual void PaintWin(HDC hdc, RECT* prcUpdate /* = NULL */);
	virtual BOOL OnInitDialog();
	virtual  void OnMzCommand(WPARAM wParam, LPARAM lParam);
	virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);
	void AnimateWindowEx_In( UINT nAnimType, bool bShow );
	void AnimateWindowEx_Out( UINT nAnimType, bool bShow );
	virtual void OnLButtonDown(UINT fwKeys, int xPos, int yPos);
	virtual void DeleteImages();
	void DestroyWindow();
private:

public:
	BOOL InitBackgrandImages();
	void LoadiInterItem();
	void OnExit();
	void OnMenu();
	void ShowMainWnd(BOOL bShow);
	void ShowOnlyWnd(UINT nWndIndex);
	void PostMessage2App4Source();
	static void APP_SWC_CbkFunc(PROTOCAL_INFO, BYTE);
	BOOL Create();

public:
	HDC				m_hBakDC;
	ImagingHelper	*m_SWCMainBG;
	HBITMAP			m_hBitmapBakDC;
public:
	UiWin		m_uiWin;
	UiSWCTopBar	m_uiTopBar;
	UiSWCSwitchWnd	m_uiSwitchWnd;
	UiSteeringWnd	m_uiSteeringWnd;
	UiCarWnd		m_uiCarWnd;
	UiAutoLogoWnd	m_uiAutoLogoWnd;
//	UiCommonWnd		m_uiCommonWnd;
//	UiControlWnd	m_uiControlWnd;
//	UiSystemWnd		m_uiSystemWnd;
public:
	void UpdateSWCKeyView(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);
	void UpdateSWCVoltage(PROTOCAL_INFO ProtocalInfo, BYTE bFlag);
	void SendSteerKeyCmd2Mcu(WPARAM wParam, LPARAM lParam);
	BOOL ReloadBkgnd();

};


#endif
